<template>
  <a-modal
    :title="title"
    :width="1200"
    :visible="visible"
    :maskClosable="false"
    :confirmLoading="confirmLoading"
    @ok="handleOk"
    @cancel="handleCancel">
    <a-spin :spinning="confirmLoading">
      <!-- 主表单区域 -->
      <a-form :form="form">
        <a-row>
          <div style="color: red;margin-bottom: 20px;">温馨提示：
   请审核企业录入信息、影像资料、两库信息、工商基本信息或主管部门行业和划型认定，予以初审通过，或提出修改要求后退回。</div>

          <!-- <a-col :span="12">
            <a-form-item label="创建人" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input v-decorator="[ 'createBy', validatorRules.createBy]" placeholder="请输入创建人"></a-input>
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="创建日期" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <j-date placeholder="请选择创建日期" v-decorator="[ 'createTime', validatorRules.createTime]" :trigger-change="true" style="width: 100%"/>
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="更新人" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input v-decorator="[ 'updateBy', validatorRules.updateBy]" placeholder="请输入更新人"></a-input>
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="更新日期" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <j-date placeholder="请选择更新日期" v-decorator="[ 'updateTime', validatorRules.updateTime]" :trigger-change="true" style="width: 100%"/>
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="所属部门" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input v-decorator="[ 'sysOrgCode', validatorRules.sysOrgCode]" placeholder="请输入所属部门"></a-input>
            </a-form-item>
          </a-col>-->
          <a-col :span="12"> 
            <a-form-item label="经办人" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input v-decorator="[ 'query01', validatorRules.query01]" placeholder="请输入经办人"></a-input>
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="邮箱" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input v-decorator="[ 'query02', validatorRules.query02]" placeholder="请输入邮箱"></a-input>
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="经办人电话" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input v-decorator="[ 'query03', validatorRules.query03]" placeholder="请输入经办人电话"></a-input>
            </a-form-item>
          </a-col>
          <!-- <a-col :span="12">
            <a-form-item label="产品标签" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input v-decorator="[ 'query04', validatorRules.query04]" placeholder="请输入产品标签"></a-input>
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="产品介绍" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input v-decorator="[ 'query05', validatorRules.query05]" placeholder="请输入产品介绍"></a-input>
            </a-form-item>
          </a-col> -->
          <a-col :span="12">
            <a-form-item label="身份证正面" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input v-decorator="[ 'query06', validatorRules.query06]" placeholder=""></a-input>
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="身份证反面" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input v-decorator="[ 'query07', validatorRules.query07]" placeholder=""></a-input>
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="企业名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input v-decorator="[ 'query08', validatorRules.query08]" placeholder="请输入企业名称"></a-input>
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="统一信用代码" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input v-decorator="[ 'query09', validatorRules.query09]" placeholder="请输入统一信用代码"></a-input>
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="街道" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input v-decorator="[ 'query10', validatorRules.query10]" placeholder="请输入注册地所在思明区街道"></a-input>
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="成立日期" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input v-decorator="[ 'query11', validatorRules.query11]" placeholder="请输入成立日期"></a-input>
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="行业" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input v-decorator="[ 'query12', validatorRules.query12]" placeholder="请输入所属行业"></a-input>
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="营业收入" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input v-decorator="[ 'query13', validatorRules.query13]" placeholder="请输入营业总收入额(万元)"></a-input>
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="人数" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input v-decorator="[ 'query14', validatorRules.query14]" placeholder="请输入签约从业人员数(人)"></a-input>
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="主营业务收入" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input v-decorator="[ 'query15', validatorRules.query15]" placeholder="请输入主营业务收入(万元)"></a-input>
            </a-form-item>
          </a-col>
       <!-- <a-col :span="12">
            <a-form-item label="备用7" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input v-decorator="[ 'query16', validatorRules.query16]" placeholder="请输入备用7"></a-input>
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="备用8" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input v-decorator="[ 'query17', validatorRules.query17]" placeholder="请输入备用8"></a-input>
            </a-form-item>
          </a-col> -->
          <a-col :span="12">
            <a-form-item label="状态" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <!-- <a-input v-decorator="[ 'query18', validatorRules.query18]" placeholder="请输入备用9"></a-input> -->
              <j-dict-select-tag type="list" v-decorator="['query18', validatorRules.query18]" :trigger-change="true" dictCode="tx_sp" placeholder="请选择状态"/>
              <!-- <a-select v-decorator="['query18', validatorRules.query18]" placeholder="请选择状态" :trigger-change="true" dictCode="tx_sp" >
                <a-select-option value="1">1</a-select-option>
                <a-select-option value="2">2</a-select-option>
                <a-select-option value="3">3</a-select-option>
              </a-select> -->
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="消息" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input v-decorator="[ 'query19', validatorRules.query19]" style="color: red;" placeholder="请输入消息"></a-input>
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="初审意见" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input v-decorator="[ 'query20', validatorRules.query20]" placeholder="请输入初审意见"></a-input>
            </a-form-item>
          </a-col>
        <!--  <a-col :span="12">
            <a-form-item label="系统计算贴息" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input v-decorator="[ 'query21', validatorRules.query21]" placeholder="请输入系统计算贴息"></a-input>
            </a-form-item>
          </a-col> -->
          <a-col :span="12">
            <a-form-item label="授权委托书" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input v-decorator="[ 'query22', validatorRules.query22]" aria-readonly=""></a-input>
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="营业执照副本" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input v-decorator="[ 'query23', validatorRules.query23]" aria-readonly=""></a-input>
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="2019年度资产负债表" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input v-decorator="[ 'query24', validatorRules.query24]" aria-readonly=""></a-input>
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="参保缴费证明及附表" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input v-decorator="[ 'query30', validatorRules.query30]" aria-readonly=""></a-input>
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="2019年度损益表" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input v-decorator="[ 'query25', validatorRules.query25]" aria-readonly=""></a-input>
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="收款账户银行名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input v-decorator="[ 'query26', validatorRules.query26]" placeholder="请输入企业收款账户银行名称"></a-input>
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="收款账户银行账号" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input v-decorator="[ 'query27', validatorRules.query27]" placeholder="请输入企业收款账户银行账号"></a-input>
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="收款账户名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input v-decorator="[ 'query28', validatorRules.query28]" placeholder="请输入企业收款账户名称"></a-input>
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="收款账户银行网点" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input v-decorator="[ 'query29', validatorRules.query29]" placeholder="请输入企业收款账户银行网点"></a-input>
            </a-form-item>
          </a-col>
          <!-- <a-col :span="12">
            <a-form-item label="备用21" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input v-decorator="[ 'query30', validatorRules.query30]" placeholder="请输入备用21"></a-input>
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="备用22" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input v-decorator="[ 'query31', validatorRules.query31]" placeholder="请输入备用22"></a-input>
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="备用23" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input v-decorator="[ 'query32', validatorRules.query32]" placeholder="请输入备用23"></a-input>
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="备用24" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input v-decorator="[ 'query33', validatorRules.query33]" placeholder="请输入备用24"></a-input>
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="备用25" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input v-decorator="[ 'query34', validatorRules.query34]" placeholder="请输入备用25"></a-input>
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="备用26" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input v-decorator="[ 'query35', validatorRules.query35]" placeholder="请输入备用26"></a-input>
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="备用27" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input v-decorator="[ 'query36', validatorRules.query36]" placeholder="请输入备用27"></a-input>
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="备用28" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input v-decorator="[ 'query37', validatorRules.query37]" placeholder="请输入备用28"></a-input>
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="备用29" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input v-decorator="[ 'query38', validatorRules.query38]" placeholder="请输入备用29"></a-input>
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="备用30" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input v-decorator="[ 'query39', validatorRules.query39]" placeholder="请输入备用30"></a-input>
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="RID" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input v-decorator="[ 'query40', validatorRules.query40]" placeholder="请输入RID"></a-input>
            </a-form-item>
          </a-col> -->

        </a-row>
      </a-form>

      <!-- 子表单区域 -->
      <a-tabs v-model="activeKey" @change="handleChangeTabs">
        <a-tab-pane tab="贴息申报" :key="refKeys[0]" :forceRender="true">
          <j-editable-table
            :ref="refKeys[0]"
            :loading="xmItem02Table.loading"
            :columns="xmItem02Table.columns"
            :dataSource="xmItem02Table.dataSource"
            :maxHeight="300"
            :rowNumber="true"
            :rowSelection="true"
            :actionButton="true"/>
        </a-tab-pane>
        
        <a-tab-pane tab="操作日志" :key="refKeys[1]" :forceRender="true" style="display: none;">
          <j-editable-table
            :ref="refKeys[1]"
            :loading="xmItem01Table.loading"
            :columns="xmItem01Table.columns"
            :dataSource="xmItem01Table.dataSource"
            :maxHeight="300"
            :rowNumber="true"
            :rowSelection="true"
            :actionButton="true"/>
        </a-tab-pane>
        
      </a-tabs>

    </a-spin>
  </a-modal>
</template>

<script>

  import pick from 'lodash.pick'
  import { FormTypes,getRefPromise } from '@/utils/JEditableTableUtil'
  import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
  import JDate from '@/components/jeecg/JDate'  

  export default {
    name: 'XmMain01Modal',
    mixins: [JEditableTableMixin],
    components: {
      JDate,
    },
    data() {
      return {
        labelCol: {
          span: 6
        },
        wrapperCol: {
          span: 16
        },
        labelCol2: {
          span: 3
        },
        wrapperCol2: {
          span: 20
        },
        // 新增时子表默认添加几行空数据
        addDefaultRowNum: 1,
        validatorRules: {
          createBy:{},
          createTime:{},
          updateBy:{},
          updateTime:{},
          sysOrgCode:{},
          query01:{},
          query02:{},
          query03:{},
          query04:{},
          query05:{},
          query06:{},
          query07:{},
          query08:{},
          query09:{},
          query10:{},
          query11:{},
          query12:{},
          query13:{},
          query14:{},
          query15:{},
          query16:{},
          query17:{},
          query18:{},
          query19:{},
          query20:{},
          query21:{},
          query22:{},
          query23:{},
          query24:{},
          query25:{},
          query26:{},
          query27:{},
          query28:{},
          query29:{},
          query30:{},
          query31:{},
          query32:{},
          query33:{},
          query34:{},
          query35:{},
          query36:{},
          query37:{},
          query38:{},
          query39:{},
          query40:{},
        },
        refKeys: ['xmItem02', 'xmItem01', ],
        tableKeys:['xmItem02', 'xmItem01', ],
        activeKey: 'xmItem02',
        // 贴息申报
        xmItem02Table: {
          loading: false,
          dataSource: [],
          columns: [
            // {
            //   title: '创建人',
            //   key: 'createBy',
            //   type: FormTypes.input,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
            // {
            //   title: '创建日期',
            //   key: 'createTime',
            //   type: FormTypes.date,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
            // {
            //   title: '更新人',
            //   key: 'updateBy',
            //   type: FormTypes.input,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
            // {
            //   title: '更新日期',
            //   key: 'updateTime',
            //   type: FormTypes.date,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
            // {
            //   title: '所属部门',
            //   key: 'sysOrgCode',
            //   type: FormTypes.input,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
            {
              title: '消息',
              key: 'query19',
              type: FormTypes.input,
              width:"200px",
              placeholder: '请输入${title}',
              defaultValue: '',
            },
            {
              title: '贷款合同编号',
              key: 'query14',
              type: FormTypes.input,
              width:"200px",
              placeholder: '请输入${title}',
              defaultValue: '',
            },
            {
              title: '贷款发放额(万元)',
              key: 'query01',
              type: FormTypes.input,
              width:"200px",
              placeholder: '请输入${title}',
              defaultValue: '',
            },
            {
              title: '放款银行',
              key: 'query02',
              type: FormTypes.input,
              width:"200px",
              placeholder: '请输入${title}',
              defaultValue: '',
            },
            {
              title: '贷款用途',
              key: 'query03',
              type: FormTypes.input,
              width:"200px",
              placeholder: '请输入${title}',
              defaultValue: '',
            },
            {
              title: '贷款期限',
              key: 'query04',
              type: FormTypes.input,
              width:"200px",
              placeholder: '请输入${title}',
              defaultValue: '',
            },
            {
              title: '签约日期',
              key: 'query05',
              type: FormTypes.input,
              width:"200px",
              placeholder: '请输入${title}',
              defaultValue: '',
            },
            {
              title: '放款日期',
              key: 'query06',
              type: FormTypes.input,
              width:"200px",
              placeholder: '请输入${title}',
              defaultValue: '',
            },
            {
              title: '贷款年利率%',
              key: 'query07',
              type: FormTypes.input,
              width:"200px",
              placeholder: '请输入${title}',
              defaultValue: '',
            },
            {
              title: '放款时点一年期LPR%',
              key: 'query08',
              type: FormTypes.input,
              width:"200px",
              placeholder: '请输入${title}',
              defaultValue: '',
            },
            {
              title: '半年应付利息(元)',
              key: 'query09',
              type: FormTypes.input,
              width:"200px",
              placeholder: '请输入${title}',
              defaultValue: '',
            },
            {
              title: '需支付利息(元)',
              key: 'query10',
              type: FormTypes.input,
              width:"200px",
              placeholder: '请输入${title}',
              defaultValue: '',
            },
            // {
            //   title: '成立日期',
            //   key: 'query11',
            //   type: FormTypes.input,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
            // {
            //   title: '行业',
            //   key: 'query12',
            //   type: FormTypes.input,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
            {
              title: '状态',
              key: 'query13',
              type: FormTypes.input,
              width:"200px",
              placeholder: '请输入${title}',
              defaultValue: '',
            },
            
            {
              title: '其他放款银行',
              key: 'query15',
              type: FormTypes.input,
              width:"200px",
              placeholder: '请输入${title}',
              defaultValue: '',
            },
            {
              title: '贷款到账凭证',
              key: 'query16',
              type: FormTypes.input,
              width:"200px",
              placeholder: '请输入${title}',
              defaultValue: '',
            },
            // {
            //   title: '备用8',
            //   key: 'query17',
            //   type: FormTypes.input,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
            // {
            //   title: '状态',
            //   key: 'query18',
            //   type: FormTypes.input,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
            
            {
              title: '银行库贴息',
              key: 'query20',
              type: FormTypes.input,
              width:"200px",
              placeholder: '请输入${title}',
              defaultValue: '',
            },
            {
              title: '系统计算贴息',
              key: 'query21',
              type: FormTypes.input,
              width:"200px",
              placeholder: '请输入${title}',
              defaultValue: '',
            },
            {
              title: '手工输入贴息',
              key: 'query22',
              type: FormTypes.input,
              width:"200px",
              placeholder: '请输入${title}',
              defaultValue: '',
            },
            // {
            //   title: '备用14',
            //   key: 'query23',
            //   type: FormTypes.input,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
            // {
            //   title: '备用15',
            //   key: 'query24',
            //   type: FormTypes.input,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
            // {
            //   title: '备用16',
            //   key: 'query25',
            //   type: FormTypes.input,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
            // {
            //   title: '备用17',
            //   key: 'query26',
            //   type: FormTypes.input,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
            // {
            //   title: '备用18',
            //   key: 'query27',
            //   type: FormTypes.input,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
            // {
            //   title: '备用19',
            //   key: 'query28',
            //   type: FormTypes.input,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
            // {
            //   title: '备用20',
            //   key: 'query29',
            //   type: FormTypes.input,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
            // {
            //   title: '备用21',
            //   key: 'query30',
            //   type: FormTypes.input,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
            // {
            //   title: '备用22',
            //   key: 'query31',
            //   type: FormTypes.input,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
            // {
            //   title: '备用23',
            //   key: 'query32',
            //   type: FormTypes.input,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
            // {
            //   title: '备用24',
            //   key: 'query33',
            //   type: FormTypes.input,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
            // {
            //   title: '备用25',
            //   key: 'query34',
            //   type: FormTypes.input,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
            // {
            //   title: '备用26',
            //   key: 'query35',
            //   type: FormTypes.input,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
            // {
            //   title: '备用27',
            //   key: 'query36',
            //   type: FormTypes.input,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
            // {
            //   title: '备用28',
            //   key: 'query37',
            //   type: FormTypes.input,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
            // {
            //   title: '备用29',
            //   key: 'query38',
            //   type: FormTypes.input,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
            // {
            //   title: '备用30',
            //   key: 'query39',
            //   type: FormTypes.input,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
            // {
            //   title: 'RID',
            //   key: 'query40',
            //   type: FormTypes.input,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
          ]
        },
        // 操作日志
        xmItem01Table: {
          loading: false,
          dataSource: [],
          columns: [
            // {
            //   title: '创建人',
            //   key: 'createBy',
            //   type: FormTypes.input,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
            // {
            //   title: '创建日期',
            //   key: 'createTime',
            //   type: FormTypes.date,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
            // {
            //   title: '更新人',
            //   key: 'updateBy',
            //   type: FormTypes.input,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
            // {
            //   title: '更新日期',
            //   key: 'updateTime',
            //   type: FormTypes.date,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
            // {
            //   title: '所属部门',
            //   key: 'sysOrgCode',
            //   type: FormTypes.input,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
            {
              title: '贷款发放额(万元)',
              key: 'query01',
              type: FormTypes.input,
              width:"200px",
              placeholder: '请输入${title}',
              defaultValue: '',
            },
            {
              title: '放款银行',
              key: 'query02',
              type: FormTypes.input,
              width:"200px",
              placeholder: '请输入${title}',
              defaultValue: '',
            },
            {
              title: '贷款用途',
              key: 'query03',
              type: FormTypes.input,
              width:"200px",
              placeholder: '请输入${title}',
              defaultValue: '',
            },
            {
              title: '贷款期限(月)',
              key: 'query04',
              type: FormTypes.input,
              width:"200px",
              placeholder: '请输入${title}',
              defaultValue: '',
            },
            {
              title: '签约日期',
              key: 'query05',
              type: FormTypes.input,
              width:"200px",
              placeholder: '请输入${title}',
              defaultValue: '',
            },
            {
              title: '放款日期',
              key: 'query06',
              type: FormTypes.input,
              width:"200px",
              placeholder: '请输入${title}',
              defaultValue: '',
            },
            {
              title: '贷款年利率%',
              key: 'query07',
              type: FormTypes.input,
              width:"200px",
              placeholder: '请输入${title}',
              defaultValue: '',
            },
            {
              title: '放款时点一年期LPR%',
              key: 'query08',
              type: FormTypes.input,
              width:"200px",
              placeholder: '请输入${title}',
              defaultValue: '',
            },
            {
              title: '半年应付利息(元)',
              key: 'query09',
              type: FormTypes.input,
              width:"200px",
              placeholder: '请输入${title}',
              defaultValue: '',
            },
            {
              title: '需支付利息(元)',
              key: 'query10',
              type: FormTypes.input,
              width:"200px",
              placeholder: '请输入${title}',
              defaultValue: '',
            },
            // {
            //   title: '费率',
            //   key: 'query11',
            //   type: FormTypes.input,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
            // {
            //   title: '备用3',
            //   key: 'query12',
            //   type: FormTypes.input,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
            {
              title: '状态',
              key: 'query13',
              type: FormTypes.input,
              width:"200px",
              placeholder: '请输入${title}',
              defaultValue: '',
            },
            {
              title: '合同编号',
              key: 'query14',
              type: FormTypes.input,
              width:"200px",
              placeholder: '请输入${title}',
              defaultValue: '',
            },
            // {
            //   title: '备用6',
            //   key: 'query15',
            //   type: FormTypes.input,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
            // {
            //   title: '备用7',
            //   key: 'query16',
            //   type: FormTypes.input,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
            // {
            //   title: '备用8',
            //   key: 'query17',
            //   type: FormTypes.input,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
            // {
            //   title: '备用9',
            //   key: 'query18',
            //   type: FormTypes.input,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
            {
              title: '消息',
              key: 'query19',
              type: FormTypes.input,
              width:"200px",
              placeholder: '请输入${title}',
              defaultValue: '',
            },
            {
              title: '银行贴息',
              key: 'query20',
              type: FormTypes.input,
              width:"200px",
              placeholder: '请输入${title}',
              defaultValue: '',
            },
            {
              title: '系统计算贴息',
              key: 'query21',
              type: FormTypes.input,
              width:"200px",
              placeholder: '请输入${title}',
              defaultValue: '',
            },
            {
              title: '手工输入贴息金额',
              key: 'query22',
              type: FormTypes.input,
              width:"200px",
              placeholder: '请输入${title}',
              defaultValue: '',
            },
            // {
            //   title: '备用14',
            //   key: 'query23',
            //   type: FormTypes.input,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
            // {
            //   title: '备用15',
            //   key: 'query24',
            //   type: FormTypes.input,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
            // {
            //   title: '备用16',
            //   key: 'query25',
            //   type: FormTypes.input,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
            // {
            //   title: '备用17',
            //   key: 'query26',
            //   type: FormTypes.input,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
            // {
            //   title: '备用18',
            //   key: 'query27',
            //   type: FormTypes.input,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
            // {
            //   title: '备用19',
            //   key: 'query28',
            //   type: FormTypes.input,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
            // {
            //   title: '备用20',
            //   key: 'query29',
            //   type: FormTypes.input,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
            // {
            //   title: '备用21',
            //   key: 'query30',
            //   type: FormTypes.input,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
            // {
            //   title: '备用22',
            //   key: 'query31',
            //   type: FormTypes.input,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
            // {
            //   title: '备用23',
            //   key: 'query32',
            //   type: FormTypes.input,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
            // {
            //   title: '备用24',
            //   key: 'query33',
            //   type: FormTypes.input,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
            // {
            //   title: '备用25',
            //   key: 'query34',
            //   type: FormTypes.input,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
            // {
            //   title: '备用26',
            //   key: 'query35',
            //   type: FormTypes.input,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
            // {
            //   title: '备用27',
            //   key: 'query36',
            //   type: FormTypes.input,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
            // {
            //   title: '备用28',
            //   key: 'query37',
            //   type: FormTypes.input,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
            // {
            //   title: '备用29',
            //   key: 'query38',
            //   type: FormTypes.input,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
            // {
            //   title: '备用30',
            //   key: 'query39',
            //   type: FormTypes.input,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
            // {
            //   title: 'RID',
            //   key: 'query40',
            //   type: FormTypes.input,
            //   width:"200px",
            //   placeholder: '请输入${title}',
            //   defaultValue: '',
            // },
          ]
        },
        url: {
          add: "/xm/xmMain01/add",
          edit: "/xm/xmMain01/edit",
          xmItem02: {
            list: '/xm/xmMain01/queryXmItem02ByMainId'
          },
          xmItem01: {
            list: '/xm/xmMain01/queryXmItem01ByMainId'
          },
        }
      }
    },
    methods: {
      getAllTable() {
        let values = this.tableKeys.map(key => getRefPromise(this, key))
        return Promise.all(values)
      },
      /** 调用完edit()方法之后会自动调用此方法 */
      editAfter() {
        let fieldval = pick(this.model,'createBy','createTime','updateBy','updateTime','sysOrgCode','query01','query02','query03','query04','query05','query06','query07','query08','query09','query10','query11','query12','query13','query14','query15','query16','query17','query18','query19','query20','query21','query22','query23','query24','query25','query26','query27','query28','query29','query30','query31','query32','query33','query34','query35','query36','query37','query38','query39','query40')
        this.$nextTick(() => {
          this.form.setFieldsValue(fieldval)
        })
        // 加载子表数据
        if (this.model.id) {
          let params = { id: this.model.id }
          this.requestSubTableData(this.url.xmItem02.list, params, this.xmItem02Table)
          this.requestSubTableData(this.url.xmItem01.list, params, this.xmItem01Table)
        }
      },
      /** 整理成formData */
      classifyIntoFormData(allValues) {
        let main = Object.assign(this.model, allValues.formValue)

        return {
          ...main, // 展开
          xmItem02List: allValues.tablesValue[0].values,
          xmItem01List: allValues.tablesValue[1].values,
        }
      },
      validateError(msg){
        this.$message.error(msg)
      },
     popupCallback(row){
       this.form.setFieldsValue(pick(row,'createBy','createTime','updateBy','updateTime','sysOrgCode','query01','query02','query03','query04','query05','query06','query07','query08','query09','query10','query11','query12','query13','query14','query15','query16','query17','query18','query19','query20','query21','query22','query23','query24','query25','query26','query27','query28','query29','query30','query31','query32','query33','query34','query35','query36','query37','query38','query39','query40'))
     },

    }
  }
</script>

<style scoped>
.ant-tabs-nav .ant-tabs-tab:last-child{display: none;}
</style>